﻿;(function($) {
    $(function() {
		$('#slider').slider({
			 loop : true,
			 autoPlay : true,
			 imgZoom: false,
			 arrow: false
		});
		
		
       //本地存储
       $(".sub_nav dl").children().each(function(i , v){
    	   $(v).data("index" , i+1);
    	   var $t = $(this),
    	   item = "firstclick" + $t.data("index");
    	   if(window.localStorage && localStorage[item] == 1){
    		   //$t.find(".icon_new").css("display" , "none");
    	   }
       });
       $(".sub_nav dl").on("click", "dt,dd",function(){
    	   
    	   var $t = $(this),
    	   item = "firstclick" + $t.data("index");
    	   
    	   if(window.localStorage){
    		  
    		  try{
    			  localStorage.setItem(item , "1")
    		  }catch(err){
    			  location.href = $t.data("href");
    		  };
    		  
    	   }
    	   
    	   location.href = $t.data("href");
       }); 
       
      
       
    });
})(Zepto);